﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using NRCP.App_Logic.Dummy;

namespace NRCP
{
    public partial class farmer_Edit : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if(!IsPostBack)
            {
                LoadData();
                
            }
        }

        private void LoadData()
        {
            Farmers farmer=ProxyData.GetAllFarmers()[0];
            txtFirstName.Text = farmer.Name;
            txtAddress.Text = farmer.Address;
            txtZilla.Text = farmer.Zilla;
            txtPoBox.Text = farmer.PO;
        }

        protected void btnSave_Click(object sender, EventArgs e)
        {
            respMessage.SetSuccessMessage("Farmer Information Updated Successfully.");
        }
    }
}